mainApp.service('orderListService', ['$resource',function ($resource){
    
    //查询用户订单信息
    this.getOrderList = function(order,pageIndex,pageSize,success,error){
        return $resource(baseUrl+"/mapi/morder/getList/:pageIndex/:pageSize",{pageIndex:pageIndex,pageSize:pageSize}).save(order,success,error);
    };
   //提交收款
   this.updatePayStatus = function(orderId,payStatus,success,error){
        return $resource(baseUrl+"/mapi/morder/payStatus/:orderId/:payStatus",{orderId:orderId,payStatus:payStatus}).get(success,error);
    };
   //提交交易状态
   this.updateDealStatus = function(orderId,status,success,error){
        return $resource(baseUrl+"/mapi/morder/reviewOrder/:orderId/:status",{orderId:orderId,status:status}).get(success,error);
    };
    //删除订单
   this.deleteOrderStatus = function(orderId,success,error){
        return $resource(baseUrl+"/mapi/morder/delete/:orderId",{orderId:orderId}).get(success,error);
    };
    //一键更新单价
        this.updatePrice = function(order,success,error){
        return $resource(baseUrl+"/mapi/morder/updatePrice").save(order,success,error);
    };
    //修改配货状态
    this.updatePhStatus = function (goods,success,error) {
        return $resource((baseUrl+"/mapi/morder/updatePhStatus"), null, {'save': {method: 'PUT'}}).save(goods,success, error);
    };
}]);

